import logging

LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(name)s: %(message)s"

logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)

logger = logging.getLogger(__name__)
logger_root = logging.getLogger('root')

if __name__ == '__main__':

    logging.info('This is a info log.')
    logger.info('A info log from the logger.')
    logger_root.info('Info from root.')
    logging.debug('Debug info here.')
    logger.debug('Debug info from the logger')
    logger_root.debug('Debug from the root.')
